package com.bridge.applets.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bridge.applets.mapper.BridgeMonitorAnalysisMapper;
import com.bridge.applets.model.entity.BridgeIdentifyCae;
import com.bridge.applets.model.entity.BridgeMonitorAnalysis;
import com.bridge.applets.service.BridgeMonitorAnalysisService;
import com.bridge.common.enums.YesOrNoEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 监测数据分析数据表 服务实现类
 * </p>
 *
 * @author xyjian
 * @since 2024-11-06
 */
@Service
public class BridgeMonitorAnalysisServiceImpl extends ServiceImpl<BridgeMonitorAnalysisMapper, BridgeMonitorAnalysis> implements BridgeMonitorAnalysisService {

    @Override
    public BridgeMonitorAnalysis queryById(Long relationMonitorAnalysisId) {
        return this.lambdaQuery()
                .eq(BridgeMonitorAnalysis::getId,relationMonitorAnalysisId)
                .eq(BridgeMonitorAnalysis::getIsDeleted, YesOrNoEnum.NO.getType())
                .one();
    }

    @Override
    public List<BridgeMonitorAnalysis> queryByIds(List<Long> ids) {
        return this.lambdaQuery()
                .in(BridgeMonitorAnalysis::getId,ids)
                .eq(BridgeMonitorAnalysis::getIsDeleted, YesOrNoEnum.NO.getType())
                .list();
    }
}
